﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;


namespace HotelManageSystem.Models
{
    public class ClientInfoModel
    {
        [Key]
        [ReadOnly(true)]
        [Editable(false)]
        [DisplayName("客户编号")]
        public string ID { get; set; }

        [DisplayName("姓名")]
        [Required(ErrorMessage = "请输入姓名！")]
        public string Name { get; set; }

        [DisplayName("客户类型")]
        [UIHint("ClientTypeDDL")]
        public  string ClientTypeName { get; set; }

        [DisplayName("性别")]
        [Required(ErrorMessage = "请填写性别！")]
        public string Sex { get; set; }

        [DisplayName("证件类型")]
        [UIHint("CertificateTypeDDL")]
        public  string CertificateTypeName { get; set; }

        [DisplayName("证件号")]
        [Required(ErrorMessage = "请输入证件号码！")]
        [RegularExpression(@"(^\d{15}$)|(^\d{17}([0-9]|X)$)", ErrorMessage = "身份证格式不正确！")]
        public string CertID { get; set; }

        [DisplayName("家庭住址")]
        [Required(ErrorMessage = "请填写家庭地址！")]
        public string Address { get; set; }

        [DisplayName("现居住地")]
        [Required(ErrorMessage = "请填写现居住地址！")]
        public string PresentAddress { get; set; }//现在居住地

        [DisplayName("电话号码")]
        [RegularExpression(@"^\d{11}$",ErrorMessage = "必须是11位手机号码")]
        public string Telphone { get; set; }

        [DisplayName("职业")]
        public string Vocation { get; set; }    //职业

        [DisplayName("公司名称")]
        public string CompanyName { get; set; }

        [Required(ErrorMessage = "请填写出生日期！")]
        [DataType(DataType.Date)]
        [DisplayName("出生日期")]
        public DateTime Birthday { get; set; }

        [DisplayName("定金")]
        [Required(ErrorMessage = "请交纳押金！")]
        public decimal AdvancePayment { get; set; }//定金

        [DisplayName("入住天数")]
        [Required(ErrorMessage = "请填写入住天数！")]
        public int HotelingDays { get; set; }//入住天数

        [DisplayName("是否已经退房")]
        [ScaffoldColumn(false)]
        public bool IsCheckOut { get; set; }//标识是否退房

        [DisplayName("注销")]
        public bool IsFreeze { get; set; }

        
       [DisplayName("备注")]
       [ScaffoldColumn(false)]
        public string Memo { get; set; }//备忘录

      
    }
}